/*
 * @Author: Marte
 * @Date:   2016-11-03 14:28:07
 * @Last Modified by:   Marte
 * @Last Modified time: 2016-11-03 15:53:57
 */

'use strict';

var fs = require('fs');
var path = require('path');
var modelpath = path.join(__dirname, './models');

//读取models下的js文件，加载执行create方法
fs.readdirSync(modelpath)
    .filter(function(file) {
        return (file.indexOf('.js') !== -1);
    })
    .forEach(function(file) {
        var model = require(path.join(modelpath, file));
        model.create();
    });
